package net.cn_su.sharpeyes.adapter;

import android.content.Context;
import android.view.View;

import net.cn_su.sharpeyes.R;
import net.cn_su.sharpeyes.baseadapter.AdapterCallback;
import net.cn_su.sharpeyes.baseadapter.CommonAdapter;
import net.cn_su.sharpeyes.baseadapter.ViewHolder;
import net.cn_su.sharpeyes.beans.Organization;

import java.util.List;

/**
 * 申请通过的组织机构列表
 */
public class OrgApplyAdapter extends CommonAdapter<Organization> {
    public OrgApplyAdapter(Context context, List<Organization> mDatas, int itemLayoutId, AdapterCallback adapterCallback) {
        super(context, mDatas, itemLayoutId, adapterCallback);
    }

    @Override
    public void convert(ViewHolder holder, final Organization item, int positon) {
        holder.setTextViewText(R.id.tv_name,item.getName())
                .setOnClick(R.id.ll_confirm, new View.OnClickListener() {
                    @Override
                    public void onClick(View v) {
                        //查看摄像头
                        adapterCallback.adapterInfotoActiity(item,1);
                    }
                });
    }
}
